package com.cts.controller;

import com.cts.model.vo.FriendVO;
import com.cts.model.vo.Result;
import com.cts.service.FriendService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @projectName: CBlog
 * @package: com.cts.controller
 * @className: FriendController
 * @author: chentongsheng
 * @description: TODO
 * @date: 2023/5/6 10:57
 * @version: 1.0
 */
@RestController
@RequestMapping("/friend")
public class FriendController {

    @Autowired
    private FriendService friendService;

    @RequestMapping("/getFriendList")
    @ApiOperation("获取友链列表")
    public Result getFriendList() {

        List<FriendVO> friendVOList = friendService.getFriendList();
        return Result.ok("查询成功", friendVOList);
    }
}
